package cn.wolfcode.trip.app.controller;

import cn.wolfcode.trip.base.service.IUserService;
import cn.wolfcode.trip.base.util.JSONResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 收藏的控制器
 */
@RestController
@RequestMapping("/enshrines")
public class EnshrineController {
    @Autowired
    private IUserService userService;


    /**
     * 添加用户id和日报的id
     * @param userId
     * @param newId
     * @return
     */
    @PostMapping
    public Object insertRelationWithNew(Long userId,Long newId) {
        userService.insertRelationWithNew(userId,newId);
        return new JSONResult();
    }
}
